package com.by.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.List;

@Data
@Accessors(chain = true)
@ApiModel("sku")
@TableName
public class Sku {
    /**
     * 属性id
     */
    @TableId(value = "sku_id",type = IdType.AUTO)
    @ApiModelProperty(value = "属性id")
    private Integer skuId;
    /**
     * SPU id
     */
    @ApiModelProperty(value = "SPU id")
    private Integer spuId;
    /**
     * sku名称
     */
    @ApiModelProperty(value = "sku名称")
    private String skuName;
    /**
     * 多个销售属性值id逗号分隔
     */
    @ApiModelProperty(value = "多个销售属性值id逗号分隔")
    private String attrs;
    /**
     * sku图片
     */
    @ApiModelProperty(value = "sku图片")
    private String imgUrl;
    /**
     * 售价，整数方式保存
     */
    @ApiModelProperty(value = "售价，整数方式保存")
    private BigDecimal priceFee;
    /**
     * 市场价，整数方式保存
     */
    @ApiModelProperty(value = "市场价，整数方式保存")
    private BigDecimal marketPriceFee;
    /**
     * 商品编码
     */
    @ApiModelProperty(value = "商品编码")
    private String partyCode;
    /**
     * 商品条形码
     */
    @ApiModelProperty(value = "商品条形码")
    private String modelId;
    /**
     * 商品重量
     */
    @ApiModelProperty(value = "商品重量")
    private Double weight;
    /**
     * 商品体积
     */
    @ApiModelProperty(value = "商品体积")
    private Double volume;
    /**
     * 状态 1:enable, 0:disable, -1:deleted
     */
    @ApiModelProperty(value = "状态 1:enable, 0:disable, -1:deleted")
    private int status;

    @TableField(exist = false)
     @ApiModelProperty("库存")
    int stock;
}
